<template>
  <div class="box">
    <h1>程序员</h1>
    <div class="list">
      <div class="list-item" v-for="item in list" :key="item.assistantId">
        <p>{{ item.title }}</p>
        <p>{{ item.tag }}</p>
        <button>生成</button>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, onBeforeMount } from "vue";
import { assistantList, IAssistantData } from "@api/chat";

let list = ref<IAssistantData>([]);
onBeforeMount(async () => {
  getList();
});

const getList = async () => {
  let res = await assistantList();
  console.log("程序员列表", res);
  list.value = res.data;
};

//点击 生成  跳转到/chat路由，然后传递code
</script>
